package br.com.mobimenu.model.impl;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "usuario")
public class Usuario extends EntidadeGeneric  {

	private static final long serialVersionUID = -2471280200771355913L;

	@Basic
	@Column(length = 100)
	private String nome;

	@Basic
	@Column(length = 100)
	private String username;

	@Basic
	@Column(length = 100)
	private String password;

	@Basic
	@Column(length = 100)
	private String email;

	@ManyToOne
	@JoinColumn(name = "autorizacao_id")
	private Autorizacao autorizacao;

	@Basic
	private boolean sistema;

	@Basic
	private boolean enable;

	public Usuario() {
		this.setEnable(true);
	}

	public Autorizacao getAutorizacao() {
		return this.autorizacao;
	}

	public String getEmail() {
		return this.email;
	}

	public String getNome() {
		return this.nome;
	}

	public String getPassword() {
		return this.password;
	}

	public String getUsername() {
		return this.username;
	}

	public boolean isEnable() {
		return this.enable;
	}

	public boolean isSistema() {
		return this.sistema;
	}

	public void setAutorizacao(Autorizacao autorizacao) {
		this.autorizacao = autorizacao;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setSistema(boolean sistema) {
		this.sistema = sistema;
	}

	public void setUsername(String username) {
		this.username = username;
	}

}
